package com.lmy.androidcustomview

import android.content.res.Resources
import android.util.TypedValue

/**
 * @author
 * @功能:
 * @Creat 2/8/21 4:08 PM
 * @Compony 465008238@qq.com
 */
val Float.toPx
    get()= TypedValue.applyDimension(
        TypedValue.COMPLEX_UNIT_DIP,
        this,
        Resources.getSystem().displayMetrics
    )
val Int.dp
    get()= this.toFloat().toPx
